import React, {
  Component
} from 'react';
import {
  StyleSheet,
} from 'react-native';
import Icon from 'react-native-vector-icons/FontAwesome';
import NavigationBar from 'react-native-navbar';


class TopBar extends Component {
  constructor(props) {
    super(props);
    this.state = {};

  }
  render() {
    return ( < NavigationBar

      statusBar = {
        {
          style: 'default'
        }
      }
      tintColor = {
        this.props.tintColor ? this.props.tintColor : '#37363e'
      }
      title = {
        {
          title: this.props.title,
          tintColor: '#fff'
        }
      }
      rightButton = {
        this.props.rightButton ? {
          title: this.props.rightButton.title,
          tintColor: '#fff',
          handler: this.props.rightButton.handler
        } : {
          title: ''
        }
      }
      leftButton = {
        this.props.leftButton ? {
          title: this.props.leftButton.title,
          tintColor: '#fff',
          handler: this.props.leftButton.handler
        } : {
          title: ''
        }
      }

      />


    );
  }
}

//样式表
const styles = StyleSheet.create({});

export default TopBar;